package com.dao;

import com.entity.Emp;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author ：Fmc
 * @date ：Created in 2022/6/9 11:02
 * @description：员工类dao层
 * @modified By：
 * @version:
 */
public interface EmpDao {
    List<Emp> findAllEmp();
    List<Map> findAllEmpMap();
    /**
     * @create by: Fmc
     * @description: 插入新员工
     * @create time: 2022/6/9 12:50
     * @return: int（影响条数）
     */
    int insertEmp(Emp emp);
    /**
     * @create by: Fmc
     * @description: 删除员工
     * @create time: 2022/6/9 12:51
     * @return: int（影响条数）
     */
    int deleteEmp(Integer empno);



    /**
     * @create by: Fmc
     * @description: 作业练习-循环插入
     * @create time: 2022/6/13 16:48
     * @return: int
     */
    int insertEmpUserFor(Emp emp);
    /**
     * @create by: Fmc
     * @description: 作业练习-foreach批量插入
     * @create time: 2022/6/13 16:49
     * @return: int
     */
    int insertEmpUseForEach(@Param("empList") List<Emp> empList);
    /**
     * @create by: Fmc
     * @description: 作业-批量删除
     * @create time: 2022/6/13 18:46
     * @return:
     */
    int deleteEmpUseForEach(@Param("empList") List<Emp> empList);
}
